// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "Widgets/SCompoundWidget.h"

class SSlider;
class SProgressBar;

namespace Plugin_List
{
	class SCollisionScrollBox_List;
}

class STextBlock_TextStyleLambda_List;
/**
 * 
 */
class LISTLIBRARY_API SOneList : public SCompoundWidget
{
public:
	SLATE_BEGIN_ARGS(SOneList)
	:_Title("")
	,_TitleStrStyle("AlibabaRegular_12_83AAD6FF")
	{}
	SLATE_ARGUMENT(FString, Title)
	SLATE_ARGUMENT(FString, TitleStrStyle)
	SLATE_END_ARGS()

	SOneList();
	/** Constructs this widget with InArgs */
	void Construct(const FArguments& InArgs);
	//更新数据表
	void UpDataList(int width,TMap<FString,float> ListData);
	//自适应宽度数据表
	void AutoWidthList(TMap<FString,float> ListData);
	//固定宽度带进度条的表
	void FixedWidthList(TMap<FString,float> ListData);
	//更改标题名字
	void UpDataTitleName(const FString InTitleName);
	//在这里绘制线
	void CleanList();
	virtual int32 OnPaint(const FPaintArgs& Args, const FGeometry& AllottedGeometry, const FSlateRect& MyCullingRect, FSlateWindowElementList& OutDrawElements, int32 LayerId, const FWidgetStyle& InWidgetStyle, bool bParentEnabled) const override;
public:
	//显示标题的字符串
	TSharedPtr<STextBlock_TextStyleLambda_List> TitleText;
	TSharedPtr <SProgressBar> ProgressBar;
	TSharedPtr<SSlider> Slider;
	//是表格内容部分
	TSharedPtr<SBox> ListContent;
	TSharedPtr<Plugin_List::SCollisionScrollBox_List> ZhuScroll;
	TSharedPtr<Plugin_List::SCollisionScrollBox_List> TextScroll;
	TArray<TSharedPtr<SImage>> YuanImageS;
	int BeforeWidth;
	bool ShowYuan;
};
